package com.joymart.order.repo;

import com.joymart.common.data.jdbc.BaseRepository;
import com.joymart.order.model.Order;
import com.joymart.order.model.OrderEvent;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Date;
import java.util.List;

@Repository
public interface OrderEventRepository extends BaseRepository<OrderEvent, String> {
    List<OrderEvent> findAllByOrderIdOrderByIdAsc(String orderId);
    List<OrderEvent> findAllByEventTypeAndCreatedAtBetween(String entityType, LocalDateTime start, LocalDateTime end);
    List<OrderEvent> findAllByEventTypeAndUserIdAndCreatedAtBetween(String eventType, String userId, LocalDateTime start, LocalDateTime end);
}
